package com.ruoyi.back.service.v3

import com.baomidou.mybatisplus.extension.plugins.pagination.Page
import com.baomidou.mybatisplus.extension.service.IService
import com.ruoyi.app.common.Data
import com.ruoyi.back.domain.v3.MyRecord
import com.ruoyi.back.domain.v3.dto.UserRecordSearchDto
import com.ruoyi.back.domain.v3.vo.UserRecordListVo
import com.ruoyi.back.domain.v3.vo.UserRecordNum
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty

interface MyRecordService : IService<MyRecord> {

    @ApiModel("管理员添加作品")
    data class AdminRecord(

        @ApiModelProperty("id")
        var id: Long? = null,

        @ApiModelProperty("生成的图片")
        var pics: String? = null,

        @ApiModelProperty("描述词")
        var descText: String? = null,

        @ApiModelProperty("创建者名称")
        var username: String? = null,

        @ApiModelProperty("尺寸信息")
        var resultConfig: String? = null,

        @ApiModelProperty("是否上架")
        var shelves: Boolean? = true,
    )

    /**
     * 用户作品列表
     */
    fun userRecordList(userRecordSearchDto: UserRecordSearchDto): Page<UserRecordListVo>

    /**
     * 管理员添加作品
     */
    fun adminAddUserRecord(adminRecord: AdminRecord): Data<Boolean>


    /**
     * 移除作品
     */
    fun removeUserRecord(ids: String): Data<Boolean>

    /**
     * 用户作品统计信息
     */
    fun userRecordNum(): Data<UserRecordNum>

    /**
     * 推荐或者取消推荐到banner
     */
    fun recommendBanner(recordId: Long): Data<Boolean>

    /**
     * 上架或者下架
     */
    fun upRecord(recordId: Long): Data<Boolean>

    /**
     * 置顶或者取消置顶
     */
    fun topRecord(recordId: Long): Data<Boolean>
}